<template>
    <div class="hello" id="hell">
     <!--<p>error111111111111111111111111111111111111111111111</p>-->
      <!--<p>{{daf}}</p>-->
      <!--<button @click="fn">1111111</button>-->
  </div>
  </template>

  <script>
  export default {
    name: 'HelloWorld',
    data () {
      return {
        msg: 'Welcome to Your Vue.js App',
        dataUrl:''
      }
    },
    model:{
      prop:'da',  //获取该组件作为子组件时的v-model所传进的值
      event:'cc'  //作为该组件要改其父组件传入值时使用$event的事件名
    },
    props:{
      da:Number,
      daf:String
    },
    methods:{
      fn(){
        console.log(this.da+1,this.da);
        this.$emit('cc',this.da+1) //改变父组件中的传入的v-model的值
      }
    }
  }
  </script>

  <!-- Add "scoped" attribute to limit CSS to this component only -->
  <style scoped>
  h1, h2 {
    font-weight: normal;
  }
  ul {
    list-style-type: none;
    padding: 0;
  }
  li {
    display: inline-block;
    margin: 0 10px;
  }
  a {
    color: #42b983;
  }
  </style>
